package com.miaoshare.app;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;


import com.miaoshare.core.base.BaseActivity;
import com.miaoshare.core.base.BasePresenter;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

public class Main2Activity extends BaseActivity {

    @Override
    protected boolean isRegisterEventBus() {
        return true;
    }

    @Override
    protected boolean isSetImmersionBar() {
        return false;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_main1;
    }

    @Override
    protected void initView() {
        Intent intent = new Intent(this,HeartService.class);
        startService(intent);
    }

    @Override
    protected void loadData() {

    }

    @Nullable
    @Override
    protected BasePresenter initPresenter() {
        return null;
    }


    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onServiceEvent(ServiceEvent event) {
        Log.e("1111","222222 收到事件");
    }

}